/**
 * Project Name:UIMS
 * File Name:SysLoginlogAction.java
 * Package Name:com.bgi.uims.module.sys.loginlog.action
 * CreateDate:2015年3月23日 上午10:09:52
 * Copyright (c) 2015, BGI_DX All Rights Reserved.
 */     

package com.bgi.uims.module.sys.operatorlog.action;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.bgi.uims.common.action.BaseAction;
import com.bgi.uims.common.dto.PageVo;
import com.bgi.uims.module.sys.operatorlog.dto.SysOperatorLog;
import com.bgi.uims.module.sys.operatorlog.service.SysOperatorLogService;
import com.bgi.uims.pub.utils.Constant;
import com.bgi.uims.pub.utils.PublicMethod;

/**
 * ClassName:SysLoginlogAction 
 * Function: TODO 
 * Reason:	 TODO 
 * @CreateDate:2015年3月23日 上午10:09:52
 * @author   tantianhua
 * @version  
 * @since    JDK 1.7
 * @see 	 
 */
@Controller
@Scope("prototype")
public class SysOperatorLogAction extends BaseAction {
	
	/**  
	 * serialVersionUID:TODO（用一句话描述这个变量表示什么）  
	 */   
	private static final long serialVersionUID = -700919983611115341L;

	private PageVo pageVo = new PageVo();
	
	private SysOperatorLog sysOperatorLog;
	
	@Resource
	private SysOperatorLogService sysOperatorLogService;

	public PageVo getPageVo() {
		return pageVo;
	}

	public void setPageVo(PageVo pageVo) {
		this.pageVo = pageVo;
	}
	
	public SysOperatorLog getSysOperatorLog() {
		return sysOperatorLog;
	}

	public void setSysOperatorLog(SysOperatorLog sysOperatorLog) {
		this.sysOperatorLog = sysOperatorLog;
	}

	/**
	 * 
	 * @Description：  查询日志信息
	 * @author: tantianhua
	 * @CreateDate:2015年3月20日 下午2:09:52
	 * @version: V1.0
	 */
	public String queryOperatorLog() {
		if (sysOperatorLog == null) {
			sysOperatorLog = new SysOperatorLog();
		}
		sysOperatorLog.getPage(this);
		pageVo = sysOperatorLogService.queryOperatorLog(sysOperatorLog);
		session.put(Constant.OPERATIONMSG, PublicMethod.operationMsg(Constant.SELECT,Constant.OPERATORLOGMODULES,sysOperatorLog, null));
		pageVo.setSuccess(true);
		return SUCCESS;
	}
	
	/**
	 * 
	 * @Description：   查询日志信息
	 * @author: wuyaohong
	 * @CreateDate:2015年4月7日 下午12:12:36
	 * @version: V1.0
	 */
	public String viewHistory() {
		if (sysOperatorLog == null) {
			sysOperatorLog = new SysOperatorLog();
		}
		sysOperatorLog.getPage(this);
		pageVo = sysOperatorLogService.viewHistory(sysOperatorLog);
		pageVo.setSuccess(true);
		return SUCCESS;
	}
}
